# Contributor: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
# Maintainer: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
pkgname=py3-succulent
pkgver=0.4.0
pkgrel=0
pkgdesc="Collect POST requests"
url="https://github.com/firefly-cpp/succulent"
arch="noarch"
license="MIT"
depends="python3 py3-flask py3-lxml py3-pandas py3-xmltodict py3-yaml"
makedepends="py3-gpep517 py3-poetry-core"
checkdepends="py3-pytest-xdist"
subpackages="$pkgname-doc $pkgname-pyc"
source="https://github.com/firefly-cpp/succulent/archive/$pkgver/succulent-$pkgver.tar.gz"
builddir="$srcdir/succulent-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest -k 'not TestProcessing'
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/succulent-$pkgver-py3-none-any.whl

	install -Dm644 CITATION.cff -t "$pkgdir"/usr/share/doc/$pkgname
	install -Dm644 README.md -t "$pkgdir"/usr/share/doc/$pkgname
}

sha512sums="
273a54b8d29d4d8208529bc5cb8148bec931eb497ea64719ed857fc55a338a3028e3953500b1037e66f5aca56569bc48ef4dab7337acf74e38536edf7094ebe8  succulent-0.4.0.tar.gz
"
